# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Monitoring.V3.Model.InternalChecker do
  @moduledoc """
  An internal checker allows Uptime checks to run on private/internal GCP resources.

  ## Attributes

  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The checker's human-readable name. The display name should be unique within a Cloud Monitoring Metrics Scope in order to make it easier to identify; however, uniqueness is not enforced.
  *   `gcpZone` (*type:* `String.t`, *default:* `nil`) - The GCP zone the Uptime check should egress from. Only respected for internal Uptime checks, where internal_network is specified.
  *   `name` (*type:* `String.t`, *default:* `nil`) - A unique resource name for this InternalChecker. The format is: projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] [PROJECT_ID_OR_NUMBER] is the Cloud Monitoring Metrics Scope project for the Uptime check config associated with the internal checker.
  *   `network` (*type:* `String.t`, *default:* `nil`) - The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the internal resource lives (ex: "default").
  *   `peerProjectId` (*type:* `String.t`, *default:* `nil`) - The GCP project ID where the internal checker lives. Not necessary the same as the Metrics Scope project.
  *   `state` (*type:* `String.t`, *default:* `nil`) - The current operational state of the internal checker.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :displayName => String.t() | nil,
          :gcpZone => String.t() | nil,
          :name => String.t() | nil,
          :network => String.t() | nil,
          :peerProjectId => String.t() | nil,
          :state => String.t() | nil
        }

  field(:displayName)
  field(:gcpZone)
  field(:name)
  field(:network)
  field(:peerProjectId)
  field(:state)
end

defimpl Poison.Decoder, for: GoogleApi.Monitoring.V3.Model.InternalChecker do
  def decode(value, options) do
    GoogleApi.Monitoring.V3.Model.InternalChecker.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Monitoring.V3.Model.InternalChecker do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
